package com.example.satoken.model;

import com.example.satoken.constants.UserConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
public class RegisterBody {

    /**
     * 用户名
     */
    @NotBlank(message = "手机号或邮箱不能为空！")
    @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH)
    private String username;

    /**
     * 用户密码
     */
    @NotBlank(message = "用户密码不能为空！")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH)
    private String password;


}